/* 个人中心页面样式 */
.profile-container {
    max-width: 1200px;
    margin: 20px auto;
    padding: 20px;
    background-color: var(--bg-color-secondary);
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* 个人信息头部 */
.profile-header {
    display: flex;
    align-items: center;
    padding-bottom: 20px;
    margin-bottom: 30px;
    border-bottom: 1px solid var(--border-color);
}

.profile-avatar {
    position: relative;
    margin-right: 30px;
}

.profile-avatar img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--primary-color);
}

#changeAvatarBtn {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.8rem;
    padding: 5px 10px;
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.3s;
}

.profile-avatar:hover #changeAvatarBtn {
    opacity: 1;
}

.profile-info h1 {
    margin: 0 0 10px 0;
    font-size: 1.8rem;
    color: var(--text-color-primary);
}

.profile-info p {
    margin: 0;
    color: var(--text-color-secondary);
    font-size: 1rem;
}

/* 内容区域 */
.profile-content {
    display: grid;
    grid-template-columns: 3fr 2fr;
    gap: 30px;
}

/* 标签内容区域 */
.profile-tabs-content {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

/* 内容区分块 */
.profile-section {
    margin-bottom: 30px;
    background-color: var(--bg-color);
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 1px 5px rgba(0, 0, 0, 0.05);
}

.profile-section h2 {
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 1.5rem;
    color: var(--text-color-primary);
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
}

/* 视频列表样式 */
.videos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
}

.video-card {
    background-color: var(--bg-color);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
}

.video-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
}

.video-thumbnail {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* 16:9 比例 */
    overflow: hidden;
}

.video-thumbnail img, .video-thumbnail .video-preview {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-preview {
    display: none;
}

.video-duration {
    position: absolute;
    bottom: 5px;
    right: 5px;
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 2px 5px;
    border-radius: 3px;
    font-size: 0.8rem;
}

.video-info {
    padding: 10px;
}

.video-title {
    margin: 0 0 8px 0;
    font-size: 1rem;
    line-height: 1.3;
    max-height: 2.6em;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    display: box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    box-orient: vertical;
}

.video-meta {
    display: flex;
    justify-content: space-between;
    color: var(--text-color-secondary);
    font-size: 0.8rem;
    margin-bottom: 8px;
}

.video-author {
    display: flex;
    align-items: center;
    gap: 5px;
}

.video-author img {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
}

.video-stats {
    display: flex;
    gap: 10px;
}

.video-actions {
    display: flex;
    justify-content: flex-end;
    gap: 5px;
}

.btn-edit, .btn-delete {
    font-size: 0.8rem;
    padding: 3px 8px;
}

.btn-edit {
    background-color: var(--primary-color);
    color: white;
}

.btn-delete {
    background-color: var(--danger-color);
    color: white;
}

/* 评论列表样式 */
.comments-list {
    max-height: 400px;
    overflow-y: auto;
}

.comment-item {
    padding: 15px;
    border-bottom: 1px solid var(--border-color);
    position: relative;
}

.comment-item:last-child {
    border-bottom: none;
}

.comment-video a {
    color: var(--primary-color);
    font-weight: bold;
    margin-bottom: 5px;
    display: block;
    text-decoration: none;
}

.comment-video a:hover {
    text-decoration: underline;
}

.comment-text {
    margin: 8px 0;
    color: var(--text-color-primary);
    line-height: 1.4;
}

.comment-date {
    color: var(--text-color-secondary);
    font-size: 0.85rem;
}

.comment-item .btn-delete {
    position: absolute;
    top: 15px;
    right: 15px;
}

/* 表单样式 */
.profile-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.profile-form .form-group {
    margin-bottom: 15px;
}

.profile-form label {
    display: block;
    margin-bottom: 5px;
    color: var(--text-color-primary);
    font-weight: 500;
}

.profile-form input {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 1rem;
    color: var(--text-color-primary);
    background-color: var(--bg-color);
}

.profile-form input:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 3px rgba(var(--primary-color-rgb), 0.2);
}

.profile-form button {
    grid-column: span 2;
    padding: 12px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.2s;
}

.profile-form button:hover {
    background-color: var(--primary-color-dark);
}

/* 加载状态样式 */
.loading-message {
    text-align: center;
    padding: 20px;
    color: var(--text-color-secondary);
}

/* 空状态和错误提示 */
.empty-message, .error-message {
    text-align: center;
    padding: 20px;
    color: var(--text-color-secondary);
    font-style: italic;
}

.error-message {
    color: var(--danger-color);
}

/* 消息提示样式 */
.message {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    padding: 12px 20px;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    z-index: 9999;
    animation: fadeIn 0.3s ease;
    white-space: nowrap;
}

.message-info {
    background-color: #f0f9ff;
    border-left: 4px solid #1e88e5;
    color: #0d47a1;
}

.message-success {
    background-color: #f0fff4;
    border-left: 4px solid #4caf50;
    color: #1b5e20;
}

.message-error {
    background-color: #fff5f5;
    border-left: 4px solid #f44336;
    color: #b71c1c;
}

.message-warning {
    background-color: #fffbf0;
    border-left: 4px solid #ff9800;
    color: #e65100;
}

.message.fadeout {
    opacity: 0;
    transition: opacity 0.5s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translate(-50%, -10px); }
    to { opacity: 1; transform: translate(-50%, 0); }
}

/* 密码字段样式增强 */
#currentPassword,
#newPassword,
#confirmPassword {
    transition: border-color 0.3s ease;
}

#currentPassword:focus,
#newPassword:focus,
#confirmPassword:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(var(--primary-rgb), 0.2);
}

/* 密码验证提示 */
.password-requirements {
    margin-top: 5px;
    font-size: 0.8rem;
    color: var(--text-color-secondary);
}

/* 密码强度指示器 */
.password-strength {
    height: 4px;
    margin-top: 5px;
    border-radius: 2px;
    background-color: #eee;
    overflow: hidden;
}

.password-strength-bar {
    height: 100%;
    width: 0%;
    transition: width 0.3s ease, background-color 0.3s ease;
}

.strength-weak { width: 33%; background-color: #f44336; }
.strength-medium { width: 66%; background-color: #ff9800; }
.strength-strong { width: 100%; background-color: #4caf50; }

/* 响应式设计 */
@media (max-width: 768px) {
    .profile-header {
        flex-direction: column;
        text-align: center;
    }
    
    .profile-avatar {
        margin-right: 0;
        margin-bottom: 15px;
    }
    
    .profile-content {
        grid-template-columns: 1fr;
    }
    
    .profile-form {
        grid-template-columns: 1fr;
    }
    
    .profile-form button {
        grid-column: span 1;
    }
    
    .videos-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
    
    .profile-tabs-content {
        gap: 20px;
    }
}

.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.video-thumbnail:hover .video-overlay {
    opacity: 1;
}

.video-overlay i {
    color: white;
    font-size: 2rem;
}

/* 删除确认对话框 */
.confirm-dialog {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    animation: fadeIn 0.2s ease;
}

.confirm-dialog-content {
    background-color: var(--bg-color);
    border-radius: 8px;
    padding: 20px;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    animation: scaleIn 0.2s ease;
}

.confirm-dialog h3 {
    margin-top: 0;
    color: var(--text-color-primary);
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
}

.confirm-dialog p {
    color: var(--text-color-primary);
    margin-bottom: 20px;
    line-height: 1.5;
}

.confirm-dialog-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.confirm-dialog .btn {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background-color 0.2s;
}

.confirm-dialog .btn-secondary {
    background-color: var(--btn-secondary-color, #e0e0e0);
    color: var(--text-color-primary);
}

.confirm-dialog .btn-danger {
    background-color: var(--danger-color, #f44336);
    color: white;
}

.confirm-dialog .btn-secondary:hover {
    background-color: var(--btn-secondary-hover-color, #d0d0d0);
}

.confirm-dialog .btn-danger:hover {
    background-color: var(--danger-color-dark, #d32f2f);
}

@keyframes scaleIn {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
} 